Optimal. Leaf size=49 \[ \frac {2 B \sqrt {x}}{c}-\frac {2 (b B-A c) \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {x}}{\sqrt {b}}\right )}{\sqrt {b} c^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {795, 81, 65,
211} \begin {gather*} \frac {2 B \sqrt {x}}{c}-\frac {2 (b B-A c) \text {ArcTan}\left (\frac {\sqrt {c} \sqrt {x}}{\sqrt {b}}\right )}{\sqrt {b} c^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 81
Rule 211
Rule 795
Rubi steps
\begin {align*} \int \frac {\sqrt {x} (A+B x)}{b x+c x^2} \, dx &=\int \frac {A+B x}{\sqrt {x} (b+c x)} \, dx\\ &=\frac {2 B \sqrt {x}}{c}+\frac {\left (2 \left (-\frac {b B}{2}+\frac {A c}{2}\right )\right ) \int \frac {1}{\sqrt {x} (b+c x)} \, dx}{c}\\ &=\frac {2 B \sqrt {x}}{c}+\frac {\left (4 \left (-\frac {b B}{2}+\frac {A c}{2}\right )\right ) \text {Subst}\left (\int \frac {1}{b+c x^2} \, dx,x,\sqrt {x}\right )}{c}\\ &=\frac {2 B \sqrt {x}}{c}-\frac {2 (b B-A c) \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {x}}{\sqrt {b}}\right )}{\sqrt {b} c^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 49, normalized size = 1.00 \begin {gather*} \frac {2 B \sqrt {x}}{c}-\frac {2 (b B-A c) \tan ^{-1}\left (\frac {\sqrt {c} \sqrt {x}}{\sqrt {b}}\right )}{\sqrt {b} c^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.53, size = 40, normalized size = 0.82
method | result | size |
derivativedivides | \(\frac {2 B \sqrt {x}}{c}+\frac {2 \left (A c -B b \right ) \arctan \left (\frac {c \sqrt {x}}{\sqrt {b c}}\right )}{c \sqrt {b c}}\) | \(40\) |
default | \(\frac {2 B \sqrt {x}}{c}+\frac {2 \left (A c -B b \right ) \arctan \left (\frac {c \sqrt {x}}{\sqrt {b c}}\right )}{c \sqrt {b c}}\) | \(40\) |
risch | \(\frac {2 B \sqrt {x}}{c}+\frac {2 \arctan \left (\frac {c \sqrt {x}}{\sqrt {b c}}\right ) A}{\sqrt {b c}}-\frac {2 \arctan \left (\frac {c \sqrt {x}}{\sqrt {b c}}\right ) B b}{c \sqrt {b c}}\) | \(53\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 39, normalized size = 0.80 \begin {gather*} \frac {2 \, B \sqrt {x}}{c} - \frac {2 \, {\left (B b - A c\right )} \arctan \left (\frac {c \sqrt {x}}{\sqrt {b c}}\right )}{\sqrt {b c} c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.81, size = 102, normalized size = 2.08 \begin {gather*} \left [\frac {2 \, B b c \sqrt {x} + {\left (B b - A c\right )} \sqrt {-b c} \log \left (\frac {c x - b - 2 \, \sqrt {-b c} \sqrt {x}}{c x + b}\right )}{b c^{2}}, \frac {2 \, {\left (B b c \sqrt {x} + {\left (B b - A c\right )} \sqrt {b c} \arctan \left (\frac {\sqrt {b c}}{c \sqrt {x}}\right )\right )}}{b c^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 180 vs.
\(2 (46) = 92\).
time = 1.06, size = 180, normalized size = 3.67 \begin {gather*} \begin {cases} \tilde {\infty } \left (- \frac {2 A}{\sqrt {x}} + 2 B \sqrt {x}\right ) & \text {for}\: b = 0 \wedge c = 0 \\\frac {2 A \sqrt {x} + \frac {2 B x^{\frac {3}{2}}}{3}}{b} & \text {for}\: c = 0 \\\frac {- \frac {2 A}{\sqrt {x}} + 2 B \sqrt {x}}{c} & \text {for}\: b = 0 \\\frac {A \log {\left (\sqrt {x} - \sqrt {- \frac {b}{c}} \right )}}{c \sqrt {- \frac {b}{c}}} - \frac {A \log {\left (\sqrt {x} + \sqrt {- \frac {b}{c}} \right )}}{c \sqrt {- \frac {b}{c}}} - \frac {B b \log {\left (\sqrt {x} - \sqrt {- \frac {b}{c}} \right )}}{c^{2} \sqrt {- \frac {b}{c}}} + \frac {B b \log {\left (\sqrt {x} + \sqrt {- \frac {b}{c}} \right )}}{c^{2} \sqrt {- \frac {b}{c}}} + \frac {2 B \sqrt {x}}{c} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.12, size = 39, normalized size = 0.80 \begin {gather*} \frac {2 \, B \sqrt {x}}{c} - \frac {2 \, {\left (B b - A c\right )} \arctan \left (\frac {c \sqrt {x}}{\sqrt {b c}}\right )}{\sqrt {b c} c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.06, size = 37, normalized size = 0.76 \begin {gather*} \frac {2\,B\,\sqrt {x}}{c}+\frac {2\,\mathrm {atan}\left (\frac {\sqrt {c}\,\sqrt {x}}{\sqrt {b}}\right )\,\left (A\,c-B\,b\right )}{\sqrt {b}\,c^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________